<template>
  <div class="index">
    <el-container>
      <!-- 左边侧边栏 -->
      <el-aside width="200px">
        <el-radio-group v-model="isCollapse" style="margin-bottom: 0px">
          <!-- <el-radio-button :label="false" >展开</el-radio-button> -->
          <!-- <el-radio-button :label="true">收起</el-radio-button> -->
        </el-radio-group>
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="4">
            <i class="el-icon-s-home"></i>
            <span slot="title"
              ><router-link to="/sou" id="wenz" @click="se">首页</router-link>
              
            </span>
          </el-menu-item>
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">工厂设置</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1">商户信息</el-menu-item>
              <el-menu-item index="1-2">推广用户</el-menu-item>
              <el-menu-item index="1-3">推广收入</el-menu-item>
              <el-menu-item index="1-4">模块管理</el-menu-item>
              <el-menu-item index="1-5">插件管理</el-menu-item>
              <el-menu-item index="1-6">我的资源包</el-menu-item>
              <el-menu-item index="1-7">我的vip卡券</el-menu-item>
              <el-menu-item index="1-8">我的客户</el-menu-item>
              <el-menu-item index="1-9">数据克隆</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">管理员/权限</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="2-1">角色管理</el-menu-item>
              <el-menu-item index="2-2">管理员列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">系统设置</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="3-1">系统参数</el-menu-item>
              <el-menu-item index="3-2">邮件网关</el-menu-item>
              <el-menu-item index="3-3">邮件提醒</el-menu-item>
              <el-menu-item index="3-4">自定义存储</el-menu-item>
              <el-menu-item index="3-5">图片验证码设置</el-menu-item>
              <el-menu-item index="3-6">图库分类</el-menu-item>
              <el-menu-item index="3-7">上传文件管理</el-menu-item>
              <el-menu-item index="3-8">在线支付</el-menu-item>
              <el-menu-item index="3-9">Banner管理</el-menu-item>
              <el-menu-item index="3-10">头条抖音小程序</el-menu-item>
              <el-menu-item index="3-11">广告位管理</el-menu-item>
              <el-menu-item index="3-12">操作日志</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">CMS模块</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="4-1"><router-link to="/CMS/fenyi" id="wenz" @click="se">分类管理</router-link></el-menu-item>
              <el-menu-item index="4-2"><router-link to="/CMS/fener" id="wenz">文章管理</router-link></el-menu-item>
              <el-menu-item index="4-3"><router-link to="/CMS/fensan" id="wenz">留言管理</router-link></el-menu-item>
              <el-menu-item index="4-4"><router-link to="/CMS/fensi"  id="wenz">单页管理</router-link></el-menu-item>
              <el-menu-item index="4-5"><router-link to="/CMS/fenwu"  id="wenz">公告管理</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>
             <el-submenu index="5">
     <template slot="title">
       <i class="el-icon-location"></i>
       <span slot="title">商城管理</span>
     </template>
     <el-menu-item-group>
       <el-menu-item index="5-1"><router-link to="/MER/meryi" id="wenz">门店管理</router-link></el-menu-item>
       <el-menu-item index="5-2"><router-link to="/MER/merer" id="wenz">门店入驻申请</router-link></el-menu-item>
       <el-menu-item index="5-3"><router-link to="/MER/mersan" id="wenz">商品分类</router-link></el-menu-item>
     </el-menu-item-group>
   </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <!-- 头部 -->
        <el-header>
          <div class="heod">
            <div>首页</div>
            <div>
              <span></span>
              <span>{{ $store.state.yonhug.realName }}</span>
              <span>({{ $store.state.yonhug.mobile }})</span>
            </div>
          </div>
        </el-header>
        <el-main >
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>

export default {
  data() {
    return {
      isCollapse: false,
      activecolor:''
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    se:function(){
      this.activecolor="#409eff"
    }
  },

};

</script>
<style scoped>
* {
  padding: 0;
  margin: 0;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  /* text-align: center; */
  /* line-height: 60px; */
}
.el-aside {
  background-color: #d3dce6;
  color: #333;
  /* text-align: center; */
  /* line-height: 200px; */
}

.el-main {
  background-color: #FFF;
  color: #333;
  /* text-align: center; */
  /* height: 100%; */
  /* line-height: 160px; */
}

body > .el-container {
  margin-bottom: 40px;
}

/* .el-container:nth-child(5) .el-aside, */
/* .el-container:nth-child(6) .el-aside {
  /* line-height: 260px; */
/* } */

/* .el-container:nth-child(7) .el-aside { */
  /* line-height: 320px; */
/* } */

/* .el-menu-vertical-demo:not(.el-menu--collapse) { */
  /* width: 200px; */
  /* min-height: 400px; */
/* } */


/* 头部 */
.heod {
  display: flex;
  justify-content: space-between;
}

.el-menu-vertical-demo{
  height: 100%;
}

.el-radio-group {
  display: flex;
}
#wenz{
      color: rgb(191, 203, 217);
      text-decoration: none;

}
</style>
<style lang="less">
.index {
  color: rgb(191, 203, 217);
  height: 100vh;
  .el-container {
    height: 100%;
  }
}
</style>
